/**
 * Created by Jie on 2017/1/20.
 */
function log(_message) {
    console.log(_message);
}
function setLocal(_key,_val) {
    store.set(_key,_val);
}
function getLocal(_key) {
    store.get(_key);
}
function clearLocal() {
    store.clear()
}
function loading(){
    $("body").mLoading();
}
function close_loading(){
    $("body").mLoading("hide");
}
function tips(_message) {
    layer.alert(_message, {
        skin: 'layui-layer-molv' //样式类名
        ,closeBtn: 0
    });
}
function getIframe() {
    var win;
    for(var i=1;i<999;i++){
        var id = 'layui-layer-iframe'+i;
        win =  document.getElementById(id);
        if(win != null && win != 'null'){
            break;
        }
    }
    return win;
}
var differentindex = 9999;
function initTips() {
    $(".list-btn").hover(function() {
        var obj = $(this);
        var val = obj.attr('data-val');
        var attrId = '#'+obj.attr('id');
        openMsg(attrId,val);
    }, function() {
        layer.close(differentindex);
    });
}
function openMsg(_id,_message) {
    differentindex = layer.tips(
        _message,
        _id, {
            tips: [1, '#3595CC'],
            time: 30000
        });
}
initTips();